<template>
<div v-show="visable" class="Modal">
  <div class="comfirm-box">
    <div class="comfirm-txt">
      {{txt}}
    </div>
    <div class="comfirm-foot">
      <div class="comfirm-btn" @click="sure">是</div>
      <div class="comfirm-btn" @click="cancel">否</div>
    </div>
  </div>
</div>
  
</template>

<script>
export default {
  props: {
    visable: {
      type: Boolean,
      default: false
    },
    txt: {
      type: String,
      default: ''
    }
  },
  methods: {
    sure() {
      this.$emit('sure')
    },
    cancel() {
      this.$emit('cancel')
    }
  },
}
</script>

<style lang="stylus">
.comfirm-box {
	width: getPx(299);
	height: getPx(152);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: $white;
  border-radius: $radius;
  .comfirm-txt {
    width: getPx(200);
    text-align: center;
    font-size: $comfirm-font-size;
    color: $comfirm;
    margin: getPx(28) auto;
    line-height: getPx(24);
  }
  .comfirm-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: getPx(47);
    color: $primary;
    border-top: 1px solid $primary;
    font-size: $comfirm-font-size;
    flexMiddle(space-between);
    .comfirm-btn {
      height: 100%;
      cursor: pointer;
      flex: 1;
      flexMiddle(center);
      &:first-child {
        border-right: 1px solid $primary;  
      }
    }
  }
}
</style>